import java.time.Duration;
import java.time.LocalTime;

public class e24 {
    public static void main(String[] args) {
        LocalTime start = LocalTime.now();
        LocalTime end = LocalTime.of(20,12,23);
        Duration duration = Duration.between(start, end);
        System.out.println("时间间隔为：" +duration.toNanos() + "纳秒");
        System.out.println("时间间隔为：" +duration.toMillis() + "毫秒");
        System.out.println("时间间隔为：" +duration.toHours() + "小时");
    }
}
